package com.ruoyi.yyq.service.impl;

import java.util.List;

import com.ruoyi.yyq.domain.CarEvaluation;
import com.ruoyi.yyq.mapper.CarEvaluationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yyq.mapper.CarOrderMapper;
import com.ruoyi.yyq.domain.CarOrder;
import com.ruoyi.yyq.service.ICarOrderService;

/**
 * 订单信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class CarOrderServiceImpl implements ICarOrderService 
{
    @Autowired
    private CarOrderMapper carOrderMapper;

    @Autowired
    private CarEvaluationMapper carEvaluationMapper;

    /**
     * 查询订单信息
     * 
     * @param id 订单信息主键
     * @return 订单信息
     */
    @Override
    public CarOrder selectCarOrderById(Long id)
    {
        return carOrderMapper.selectCarOrderById(id);
    }

    @Override
    public CarOrder selectCarOrderByCode(String verificationCode) {
        return carOrderMapper.selectCarOrderByCode(verificationCode);
    }

    /**
     * 查询订单信息列表
     * 
     * @param carOrder 订单信息
     * @return 订单信息
     */
    @Override
    public List<CarOrder> selectCarOrderList(CarOrder carOrder)
    {
        return carOrderMapper.selectCarOrderList(carOrder);
    }

    /**
     * 新增订单信息
     * 
     * @param carOrder 订单信息
     * @return 结果
     */
    @Override
    public int insertCarOrder(CarOrder carOrder)
    {
        return carOrderMapper.insertCarOrder(carOrder);
    }

    /**
     * 修改订单信息
     * 
     * @param carOrder 订单信息
     * @return 结果
     */
    @Override
    public int updateCarOrder(CarOrder carOrder)
    {
        return carOrderMapper.updateCarOrder(carOrder);
    }

    /**
     * 批量删除订单信息
     * 
     * @param ids 需要删除的订单信息主键
     * @return 结果
     */
    @Override
    public int deleteCarOrderByIds(Long[] ids)
    {
        return carOrderMapper.deleteCarOrderByIds(ids);
    }

    /**
     * 删除订单信息信息
     * 
     * @param id 订单信息主键
     * @return 结果
     */
    @Override
    public int deleteCarOrderById(Long id)
    {
        return carOrderMapper.deleteCarOrderById(id);
    }

    @Override
    public String selectCarOrderWithServiceName(Long id) {
        return carOrderMapper.selectCarOrderWithServiceName(id);
    }

    @Override
    public int updateCarOrderUseTimeAndStatus(CarOrder carOrder) {
        return carOrderMapper.updateCarOrderUseTimeAndStatus(carOrder);
    }

    @Override
    public List<CarEvaluation> selectEvaluationsByMid(Long mid)
    {
        return carEvaluationMapper.selectEvaluationsByMid(mid);
    }

    @Override
    public List<CarOrder> selectCarOrderByUserId(Long uid) {
        return carOrderMapper.selectCarOrderByUserId(uid);
    }
}
